<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>商品管理 - 新增商品</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 新增商品 </h3>
        <ul class="page-breadcrumb breadcrumb">
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 商品管理 <i class="icon-angle-right"></i> </li>
          <li> <a href="/goods/jifen">积分商品</a> <i class="icon-angle-right"></i> </li>
          <li>新增商品</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN SAMPLE FORM PORTLET-->
        <form class="form-horizontal" method="post" onSubmit="return chkfrm();" action="/goods/savejifen" role="form">
          <input type="hidden" name="act" value="add">
          <div class="tabbable tabbable-custom boxless">            
            <div class="tab-content">              
              <!--Tab2-->
              <div class="tab-pane active" id="tab_2">
                <div class="portlet box blue ">
                  <div class="portlet-title">
                    <div class="caption"> <i class="icon-reorder"></i> 详细信息 </div>
                  </div>
                  <div class="portlet-body form">
                    <div class="form-body">                    	
                      <div class="form-group">
                        <label  class="col-md-2 control-label">关联商品ID<span class="required">*</span></label>
                        <div class="col-md-3">
                          <input type="text" name="goods_id" value="" id="_goods_id" maxlength="10" class="form-control">
                          <span class="help-block">请填写商品列表中的商品ID</span> </div>
                      </div>
                      <div class="form-group">
                        <label  class="col-md-2 control-label">库存数量<span class="required">*</span></label>
                        <div class="col-md-3">
                          <input type="text" name="goods_number" value="" id="_goods_number" maxlength="10" class="form-control">
                          <span class="help-block">请填写允许积分兑换的商品数量</span> </div>
                      </div>
                      <div class="form-group">
                        <label  class="col-md-2 control-label">兑换积分<span class="required">*</span></label>
                        <div class="col-md-3">
                          <input type="text" name="jifen" value="" id="_jifen" maxlength="10" class="form-control">
                          <span class="help-block">请填写需要多少积分才能兑换此商品</span> </div>
                      </div>
                      
                      <div class="form-group">
                          <label class="col-md-2 control-label">状态</label>
                          <div class="col-md-6">
                             <div class="radio-list">
                                <label class="radio-inline">
                                <div id="uniform-optionsRadios25" class="radio"><span><input name="stat" id="optionsRadios25" value="1" checked type="radio"></span></div> <span class="label label-success">正常</span>
                                </label>
                                <label class="radio-inline">
                                <div id="uniform-optionsRadios26" class="radio"><span class="checked"><input name="stat" id="optionsRadios26" value="2" type="radio"></span></div> <span class="label label-danger">禁用</span>
                                </label>                               
                             </div>
                          </div>
                       </div>
                      
                    </div>
                    <div class="form-actions fluid">
                      <div class="col-md-offset-3 col-md-9">
                        <button type="submit" class="btn blue">提交</button>
                      </div>
                    </div>
                  </div>
                </div>
              </div>              
              <!--End Tab--> 
            </div>
          </div>
        </form>
        <!-- END SAMPLE FORM PORTLET--> 
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script>
jQuery(document).ready(function() {    
   App.init();
});
	
</script> 
<script type="text/javascript">

function chkfrm(){
	
	if($("#_goods_id").prop("value")=="" ){
		alert("请填写商品ID");
		$("#_goods_id").focus();
		return false;
	}
	
	if($("#_goods_number").prop("value")=="" ){
		alert("请填写库存数量");
		$("#_goods_id").focus();
		return false;
	}
	
	if($("#_jifen").prop("value")=="" ){
		alert("请填写兑换所需积分数量");
		$("#_jifen").focus();
		return false;
	}
	
}
</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>